-module(p33).
-compile(export_all).

main() -> [Fr || Fr <- fractions(),
                 is_equal(Fr, cancelled(Fr))].

fractions() -> 
    Seq = lists:seq(10, 99),
    [{X, Y} || X <- Seq, Y <- Seq, X < Y, 
               X rem 10 /= 0, Y rem 10 /= 0,
               X rem 10 =:= Y div 10 ].

cancelled({X, Y}) ->
    {X div 10, Y rem 10}.

is_equal({X, Y}, {X1, Y1}) ->
    X / Y == X1 / Y1.
